CC=gcc
CXX=g++
RM=rm -f

SDL_CFLAGS=$(shell sdl-config --cflags)
SDL_LIBS=$(shell sdl-config --libs)

CFLAGS=-g -Wall $(SDL_CFLAGS) 
CXXFLAGS=$(CFLAGS)
LIBS=$(SDL_LIBS) -lSDL_mixer
SUFFIXES=.c .cpp .o


.cpp.o:
	$(CXX) -c $(CFLAGS) -o $@ $<

all:	strange

strange: cards.o combat.o combat_display.o combat_init.o combat_sim.o \
	combat_weapons.o endgame.o font.o gfx.o interface.o is_fileio.o \
	main.o modconfig.o sdl_iface.o sdl_main.o sound.o sprites.o \
	starmap.o starmap_encounters.o starmap_init.o starmap_inventory.o \
	startgame.o textstr.o w32_gfx.o w32_sound.o
	$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)

clean:
	$(RM) *.o
	$(RM) *~
